$(document).ready(function () {
    setInterval(registoktz,1000);
});

function registoktz() {
    var number = $("#company").text();
    number = number-1;
    if(number==0){
        number=5;
        window.location.href="https://www.baidu.com/";
        return;
    }
    $("#company").text(number);

}